var postContent = "";
var title = "修改信息";
var parentView;
var flag;
(function(e) {

	mui.init({

	});
	setPxPerRem();
	mui.plusReady(function() {
		postContent = getQueryString("postContent");
		title = getQueryString("title");
		flag = getQueryString("flag");
		parentView = plus.webview.getWebviewById("page_meinfo.html");
		if(flag === 1 ){
			$("#contentInput").attr('type' , "text");
		} else if(flag === 2 ){
			$("#contentInput").attr('type' , "number");
		} 
		$("#projectTitle").html(title);
		$("#contentInput").val(postContent);
	});
})(mui);

$("#submitBtn").click(function() {
	var changeStr = $("#contentInput").val();

	if(isEmpty(changeStr)) {
		mui.toast("请输入后再保存");
		return;
	}

	var params = {
		changeStr: changeStr,
		flag: flag
	}
	
	console.log("changeStr==>>" + JSON.stringify(params));
	console.log("parentView==>>" + parentView);
	mui.fire(parentView, 'backResult', params);
	mui.back();
});